(0) Obligation:

Clauses:

append([], XS, XS).
append(.(X, XS), YS, .(X, ZS)) :- append(XS, YS, ZS).
s2l(s(X), .(Y, Xs)) :- s2l(X, Xs).
s2l(0, []).
goal(X) :- ','(s2l(X, XS), append(XS, YS, ZS)).

Query: goal(g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

s2lA(s(T16), .(X64, X65)) :- s2lA(T16, X65).
s2lA(0, []).
appendB([], X112, X112).
appendB(.(T27, T29), X129, .(T27, X130)) :- appendB(T29, X129, X130).
goalC(s(T8)) :- s2lA(T8, X30).
goalC(s(T8)) :- ','(s2lA(T8, T22), appendB(T22, X97, X98)).
goalC(0).

Query: goalC(g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
goalC_in: (b)
s2lA_in: (b,f)
appendB_in: (b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOALC_IN_G(s(T8)) → U3_G(T8, s2lA_in_ga(T8, X30))
GOALC_IN_G(s(T8)) → S2LA_IN_GA(T8, X30)
S2LA_IN_GA(s(T16), .(X64, X65)) → U1_GA(T16, X64, X65, s2lA_in_ga(T16, X65))
S2LA_IN_GA(s(T16), .(X64, X65)) → S2LA_IN_GA(T16, X65)
GOALC_IN_G(s(T8)) → U4_G(T8, s2lA_in_ga(T8, T22))
U4_G(T8, s2lA_out_ga(T8, T22)) → U5_G(T8, appendB_in_gaa(T22, X97, X98))
U4_G(T8, s2lA_out_ga(T8, T22)) → APPENDB_IN_GAA(T22, X97, X98)
APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → U2_GAA(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → APPENDB_IN_GAA(T29, X129, X130)

The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
GOALC_IN_G(x1)  =  GOALC_IN_G(x1)
U3_G(x1, x2)  =  U3_G(x2)
S2LA_IN_GA(x1, x2)  =  S2LA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U4_G(x1, x2)  =  U4_G(x2)
U5_G(x1, x2)  =  U5_G(x2)
APPENDB_IN_GAA(x1, x2, x3)  =  APPENDB_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x5)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GOALC_IN_G(s(T8)) → U3_G(T8, s2lA_in_ga(T8, X30))
GOALC_IN_G(s(T8)) → S2LA_IN_GA(T8, X30)
S2LA_IN_GA(s(T16), .(X64, X65)) → U1_GA(T16, X64, X65, s2lA_in_ga(T16, X65))
S2LA_IN_GA(s(T16), .(X64, X65)) → S2LA_IN_GA(T16, X65)
GOALC_IN_G(s(T8)) → U4_G(T8, s2lA_in_ga(T8, T22))
U4_G(T8, s2lA_out_ga(T8, T22)) → U5_G(T8, appendB_in_gaa(T22, X97, X98))
U4_G(T8, s2lA_out_ga(T8, T22)) → APPENDB_IN_GAA(T22, X97, X98)
APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → U2_GAA(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → APPENDB_IN_GAA(T29, X129, X130)

The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
GOALC_IN_G(x1)  =  GOALC_IN_G(x1)
U3_G(x1, x2)  =  U3_G(x2)
S2LA_IN_GA(x1, x2)  =  S2LA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U4_G(x1, x2)  =  U4_G(x2)
U5_G(x1, x2)  =  U5_G(x2)
APPENDB_IN_GAA(x1, x2, x3)  =  APPENDB_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x5)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 7 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → APPENDB_IN_GAA(T29, X129, X130)

The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
APPENDB_IN_GAA(x1, x2, x3)  =  APPENDB_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPENDB_IN_GAA(.(T27, T29), X129, .(T27, X130)) → APPENDB_IN_GAA(T29, X129, X130)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
APPENDB_IN_GAA(x1, x2, x3)  =  APPENDB_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPENDB_IN_GAA(.(T29)) → APPENDB_IN_GAA(T29)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPENDB_IN_GAA(.(T29)) → APPENDB_IN_GAA(T29)
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2LA_IN_GA(s(T16), .(X64, X65)) → S2LA_IN_GA(T16, X65)

The TRS R consists of the following rules:

goalC_in_g(s(T8)) → U3_g(T8, s2lA_in_ga(T8, X30))
s2lA_in_ga(s(T16), .(X64, X65)) → U1_ga(T16, X64, X65, s2lA_in_ga(T16, X65))
s2lA_in_ga(0, []) → s2lA_out_ga(0, [])
U1_ga(T16, X64, X65, s2lA_out_ga(T16, X65)) → s2lA_out_ga(s(T16), .(X64, X65))
U3_g(T8, s2lA_out_ga(T8, X30)) → goalC_out_g(s(T8))
goalC_in_g(s(T8)) → U4_g(T8, s2lA_in_ga(T8, T22))
U4_g(T8, s2lA_out_ga(T8, T22)) → U5_g(T8, appendB_in_gaa(T22, X97, X98))
appendB_in_gaa([], X112, X112) → appendB_out_gaa([], X112, X112)
appendB_in_gaa(.(T27, T29), X129, .(T27, X130)) → U2_gaa(T27, T29, X129, X130, appendB_in_gaa(T29, X129, X130))
U2_gaa(T27, T29, X129, X130, appendB_out_gaa(T29, X129, X130)) → appendB_out_gaa(.(T27, T29), X129, .(T27, X130))
U5_g(T8, appendB_out_gaa(T22, X97, X98)) → goalC_out_g(s(T8))
goalC_in_g(0) → goalC_out_g(0)

The argument filtering Pi contains the following mapping:
goalC_in_g(x1)  =  goalC_in_g(x1)
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
s2lA_in_ga(x1, x2)  =  s2lA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
0  =  0
s2lA_out_ga(x1, x2)  =  s2lA_out_ga(x2)
.(x1, x2)  =  .(x2)
goalC_out_g(x1)  =  goalC_out_g
U4_g(x1, x2)  =  U4_g(x2)
U5_g(x1, x2)  =  U5_g(x2)
appendB_in_gaa(x1, x2, x3)  =  appendB_in_gaa(x1)
[]  =  []
appendB_out_gaa(x1, x2, x3)  =  appendB_out_gaa
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
S2LA_IN_GA(x1, x2)  =  S2LA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2LA_IN_GA(s(T16), .(X64, X65)) → S2LA_IN_GA(T16, X65)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
S2LA_IN_GA(x1, x2)  =  S2LA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S2LA_IN_GA(s(T16)) → S2LA_IN_GA(T16)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • S2LA_IN_GA(s(T16)) → S2LA_IN_GA(T16)
    The graph contains the following edges 1 > 1

(22) YES